@extends("admin.template.main")
@section("title")
  Quản Trị.
@endsection
@section("content")
    <nav class="navbar navbar-default" role="navigation">
    <div class="container-fluid">
      <!-- Brand and toggle get grouped for better mobile display -->
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a href="{{Asset('/admin')}}" class="navbar-brand"><span class="glyphicon glyphicon-home"></span></a>
      <a href="{{Asset('/admin')}}" class="navbar-brand">TeachingNotes</a>
      </div>
      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <ul class="nav navbar-nav">
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-th-large"></span> Quản Lý Ghi Chú <span class="caret"></span></a>
            <ul class="dropdown-menu" role="menu">
              <li>{{link_to_route('admin.monhoc.index', 'Môn Học', null, null) }}</li>
              <li class="divider"></li>
              <li>{{link_to_route('admin.chuong.index', 'Chương', null, null) }}</li>
               <li class="divider"></li>
               <li>{{link_to_route('admin.ghichu.index', 'Ghi Chú', null, null) }}</li>
            </ul>
          </li>
        </ul>
         <ul class="nav navbar-nav">
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-align-justify"></span> Hệ Thống <span class="caret"></span></a>
            <ul class="dropdown-menu" role="menu">
              <li><a href="{{Asset('/')}}">Người Dùng</a></li>
            </ul>
          </li>
        </ul>
        <ul class="nav navbar-nav navbar-right">        
          <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">@if(Session::has('logined'))
             Xin chào, {{Session::get('account')}} 
          @endif <span class="caret"></span></a>
            <ul class="dropdown-menu" role="menu">
              <li><a href="#">Chỉnh sửa thông tin</a></li>
              <li class="divider"></li>
                <li><a href="{{Asset('/')}}">Về trang chủ</a></li>
              <li class="divider"></li>
              <li><a href="{{Asset('/logout')}}">Đăng xuất</a></li>
            </ul>
          </li>
            <li><a href="#" style="padding:0px;">
                <!-- <img width="60" height="60"  class="img-thumbnail" src="http://www.murketing.com/journal/wp-content/uploads/2009/04/yammer.gif" class="img-responsive" alt="Responsive image"> -->
              </a>
            </li>        
        </ul>
      </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
  </nav>

<div class="panel panel-primary">
   
   @if(empty($chuc_nang) || !Session::has('logined'))
         @include('admin.dashboard', array('ten_chuc_nang'=>'DashBoard'))   
    @endif

   @if(!empty($chuc_nang) && Session::has('logined'))
      @include($chuc_nang, array('ten_chuc_nang'=>$ten_chuc_nang))
   @endif
   </div>
@endsection
